import React from 'react';
import { DrawerNavigator, StackNavigator, TabNavigator, TabBarTop, TabBarBottom, NavigationActions, Image } from 'react-navigation'
import { IndexScreen } from "../pages/IndexScreen";
import { SubStationListScreen } from "../pages/data/SubStationLisScreen";
import { ItemHistoryScreen } from "../pages/data/item/ItemHistoryScreen";
import { AlarmListScreen } from "../pages/alarm/AlarmListScreen";
import { AlarmStationsScreen } from "../pages/alarm/AlarmStationsScreen";
import { MyInfoScreen } from "../pages/mine/MyInfoScreen";
import { DeviceListScreen } from "../pages/data/DeviceListScreen";
import { LoginScreen } from '../pages/LoginScreen'
import { RegisterScreen } from '../pages/RegisterScreen'
import { PromptScreen } from '../pages/Prompt/PromptScreen'
import { ChangePassword } from '../pages/mine/ChangePassword'
import { ChooseStationScreen } from '../pages/mine/ChooseStationScreen'

export const MainScreenNavigator = TabNavigator({
    IndexTab: {
        screen: IndexScreen
    },
    DataTab: { screen: SubStationListScreen },
    AlarmTab: { screen: AlarmStationsScreen },
    MineTab: { screen: MyInfoScreen }
}, {
        tabBarPosition: 'bottom',
        animationEnabled: true,
        tabBarOptions: {
            showIcon: true,
            style: {
                backgroundColor: '#fff',
            },
            labelStyle: {
                color: '#000'
            }
        },
        lazy: true,
        headerTintColor: 'black'
    }
)
//登陆页面跳转
export const LoginRout = StackNavigator({
    // 登录和主页
    LoginScreen: { screen: LoginScreen },
    RegisterScreen: { screen: RegisterScreen },
    MainScreenNavigator: { screen: MainScreenNavigator },
    AlarmStationsScreen: {screen: AlarmStationsScreen},
    AlarmListScreen: {screen: AlarmListScreen},
    // 数据标签，针对单个变电站的测温探头列表
    DeviceListScreen: { screen: DeviceListScreen },
    ChangePassword: { screen: ChangePassword },
    // 选择变电站
    ChooseStationScreen: { screen: ChooseStationScreen },
    ItemHistoryScreen: { screen: ItemHistoryScreen },
    //提示页面测试
    // MyInfoScreen: { screen: MyInfoScreen },
    PromptScreen: { screen: PromptScreen },
    //播放音频测试
    MyInfoScreen: { screen: MyInfoScreen }
}, {
        // initialRouteName: 'MainScreenNavigator',
        headerBackTitle: null,
        headerTintColor: '#333333'
});
